import 'package:flutter/material.dart';
import '../model/counter_model.dart';

class CounterViewModel extends ChangeNotifier {
  final CounterModel _model = CounterModel();

  int get count => _model.count;

  void increment() {
    _model.increment();
    notifyListeners(); // 通知监听器（UI）更新
  }

  void decrement() {
    _model.decrement();
    notifyListeners(); // 通知监听器（UI）更新
  }
}